Skip to content

Conversation

@Lontronix
Copy link
Member

No description provided.

To do this through docker, run

```
docker run --name postgres --mount target=/var/lib/postgresql/data,type=volume,src=conditional-db -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker run --name postgres --mount target=/var/lib/postgresql/data,type=volume,src=conditional-db -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
docker run --name postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres

You don't need to mount anything, the container db will persist as long as the container sticks around.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you should change config.env.py to use the connection string for this as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants